package com.example.shop.rabbitmq.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class ChatMessage {
    /**
     * 商家id
     */
    @NotNull
    Long merchantId;
    /**
     * 用户id
     */
    @NotNull
    Long userId;
    /**
     * 消息内容
     */
    @NotEmpty
    String content;

    @Override
    public String toString() {
        return "ChatMessage{" +
                "merchantId=" + merchantId +
                ", userId=" + userId +
                ", content='" + content + '\'' +
                '}';
    }
}
